package com.fh.config;

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {

//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2021000118640484";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCxtcfz7FGaUlotadN7qgiciSYbLnCHe+RfvPbyE1ARxaEf5QK8ga433AYWq1GlOynZBHxJ7u/yJ5JgywkT/zADCbC22uEO8dvTf8JhySlRrSbgpEw0n1MEfrdx/Z6dpYJsyoCVipuA1ye8A4dWhM+SVXyuIQ5SpwaUn43QU6UdWcgw5c4X0HZwNvtJjLVlzA63w7AiIqDpOJTXH4FRg7K8+JR2JpVDGTAF445ziYkVQ1+mRVfq8MdHE0Z7EiyrQC9zcJYfy25v/m8qQ9XeHJ9WR97E2PAAy5KA7ZFb7d0DBPP1DBQjopaEYUaBAanHxCRcUv+Kw/AibF5iaQZ3abEZAgMBAAECggEAP0W/yaNscou7u8ugFrm1kzZpsOfZ/QMpjsTTD+G8cndxJM//J2rswsq+CDg7O59TCQfF0PUXzZo1Te08cDg9ufcrSg+obg/C+wzUAskCwyfpXbZhw6Kuhj0vx5BLd0nEpEN9gMD3GOqCJTkEaNOkrC9v0vfGB7ucZjJg5bnCYi5LS7ShTOgbFG+Bc1IDJOeh8hHvhyX8vFjBO4AVeoO/RTwZXXgwsdFFTO95gZ8e4CqkD6fPQZ5+dph0oMeNJMA9mrTLh6bXKDEFeTnH1TEa7pgWEL/TCa5KYoIAG4Ra4mNm4NXP07mrNxQvhUxiSCJQGFm/VqN3/+KhNDOF1UzUAQKBgQDeMakwLjl8HrK/ZhPzSJLplzHMmvEtF4m+bwqwDcBEgTiCmHy6PKGJLnuwGnOTF++paxADQ65FUT/Wecl9nVC0u5Kxw5BAaHKRNumBiH4+g40re5TmMVit5wV6MjrXiRtbKp50yU22DeOVTzItH4tHF1ZYjgcHoEA3eYJWVezd2QKBgQDMv37T1GDNdmq9AnAm3OFNCxyXDCscxUTtT7uiK4w0USw9B+3aTRPvGE1mwDUXaldfqnqSApYKc29jtC1M/cVTDug/BUq/+lXOFWpV7PGlynfE8MYi2hOCZqU0LQHr1uwmcnnnIYdVaCAaGyUtC4aw34F+dKpQ8EsqlkI7Cb0lQQKBgD2hRK5qg+NbmHTiWXJHlQhZuaRo7bB2MOyzXCGNDuFxfj0rEp2Np7inPgOQsrIAF6fEXIKrSTFM4goZabv/4Jzg0kWgWuiij/SbaJVXSL0KPCPteVWIJnLF+4zzVcLm8sGMxrraA0YWACQv/VjqwPUNEhQqAOUqm+VHPNG5r6OxAoGBAJdJlAQftFt8+UepyobcxNkxsbFme2Cp3tFfDey5MsLhi8eY2UZpl6YeleqrcU9Y8zCr/h9vK8CTJSZN1v9BsBE8PZ17Yo1SAx7gsg7FopR3c2Ig6raL3siG4eEYtIe36gxKoAqJur7/zmCb2C9dieudasiumb5un4vbNRr8ijdBAoGAOVJAm3FjVWVKCL4/ZfaA+Qykykv9bNx06I53gByfZuso18rlO1r2/a64rWkJw9xVyoP/+I6rgJVax0nuZyhgDExxfuHQBL6cnZkmiGOSsQcNiBxeilOAUxIpRltJ5xXAKzWTHR2rWxoIqbrMmsQxHLqUtp56Klfy9Elu0CXi0S4=";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnagU3eOOFk8zjyI0K0fIUfhnPH4t1X9I3wVrXRdiBXWF9kkwCT/jRKdMUXVpp+bDLynQD9OG20vt7UF2JwOBxfrSDa0jMBIQgwr3HjMXzcWs4i5EktDnavR6lkjuCHx6jd1II2UpCSBLGLOZxwT/8SzJGo8shHe/nZTlO2C4OJcKEv0kG9zMxm4EhzTeJdaserR7fzqA1xrLgHldB6/JjjfnPG1mw8CGI9U2M8wKOSLXGNLobTHRmwVptJTxT4S0vg1lFpuV4fGSGtRQ/8JaMNEXnZ8TO6Hy+lMQaV6BXxs3P4M9VPvYBszm9TjFLLtDQ7HVMXJ1Di18XsQGjXPY2wIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://ykgd68.nataoofree.cc";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://localhost:8080/#/alipaySuccess";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "C:\\";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}

